package com.leetcode;

import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

/**
 * 微信红包和数字转汉字
 *
 * @author Administrator
 */
public class toutiao {

    static Map<String, String> map = new HashMap<>(16);
    static Map<String, String> segmentMap = new HashMap<>(16);

    static {
        map.put("1", "十");
        map.put("2", "百");
        map.put("3", "千");

        segmentMap.put("1", "");
        segmentMap.put("2", "万");
        segmentMap.put("3", "亿");
    }

    public static void main(String[] args) {
        String s = "123123432";
        List<String> list = convert(s);
        int size = list.size();
        for (int i = 0; i < size; i++) {
            String s1 = list.get(i);
            String[] split = s1.split("");
            int length = split.length;
            for (int j = 0; j < length; j++) {
                switch (i) {
                    case 0:
                        break;
                    case 1:
                        break;
                    case 2:
                        break;
                    case 3:
                        break;
                    default:
                        break;
                }
            }
        }
    }

    private static List<String> convert(String num) {
        List<String> list = new ArrayList<>(8);
        String substring = "";
        do {
            substring = num.substring(num.length() - 4);
            num = num.substring(0, num.length() - 4);
            list.add(substring);
        } while (num.length() > 4);
        list.add(num);
        return list;
    }
}
